package cn.baage.campus.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 * @Description: 评论
 * @Author: 八阿哥
 * @url: baage.cn
 * @Version: 1.0
 **/
@Data
@Builder
@ApiModel(value = "评论")
@TableName(value = "bc_comment")
public class Comment {

    @ApiModelProperty(value = "评论ID")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "父评论ID（无父评论则为 0）")
    private String parentId;

    @ApiModelProperty(value = "帖子ID")
    private String postingId;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "评论内容")
    private String content;

    @ApiModelProperty(value = "点赞数")
    private Integer likeNum;

    @ApiModelProperty(value = "包含图片")
    private Boolean haveImg;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "是否删除")
    private Boolean delFlag;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "头像")
    private String avatarUrl;

    @ApiModelProperty(value = "回复评论ID")
    private String replyId;

    @ApiModelProperty(value = "回复目标昵称")
    private String replyNickName;

}
